clear all
load W_time1_eh0_comp1.out
load W_time2_eh0_comp1.out
load ParEst_eh0_time0_Mex_girls_allboots
ParEst_eh0_time0_Mex_girls_all_boots=ParEst_eh0_time0_Mex_girls_allboots;
load ParEst_eh0_time2_Mex_girls_all_boots

boot_t0=ParEst_eh0_time0_Mex_girls_all_boots(:,end); 
boot_t1=ParEst_eh0_time2_Mex_girls_all_boots(:,end);

theta= 10.^(ParEst_eh0_time0_Mex_girls_all_boots(:,11));
a=1000*ParEst_eh0_time0_Mex_girls_all_boots(:,12);
gamma = 500*ParEst_eh0_time2_Mex_girls_all_boots(:,1);

w_mom0=W_time1_eh0_comp1(boot_t0,17); % Read wage moments
p50wi_1=w_mom0; 
HH_avg_Inc = p50wi_1; % median wage of informal men
MWP_a_boot = a./(exp(-theta.*HH_avg_Inc));

for i= boot_t0'
    for j= boot_t1'
    if i==j
        auxtheta(j)= 10.^(ParEst_eh0_time0_Mex_girls_all_boots(find(ParEst_eh0_time0_Mex_girls_all_boots(:,14)==i),11));   
    end
    end
end
theta_1= nonzeros(auxtheta);
w_mom1=W_time2_eh0_comp1(boot_t1,17); % Read wage moments
p50wi_1=w_mom1; 
HH_avg_Inc = p50wi_1; % median wage of informal men
MWP_gamma_boot = gamma./(exp(-theta_1.*HH_avg_Inc));

save MWP_a_boot MWP_a_boot
save MWP_gamma_boot MWP_gamma_boot